From: Keir Fraser Date: Wed, 10 Feb 2010 13:27:55 +0000 (+0000) Subject: Remove hardcoded instances of TIMER_SLOP. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12621 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=e1fadda8bd76fab0cc7c3d17e1437151ae8ed647;p=xen.git Remove hardcoded instances of TIMER_SLOP. They aren't needed at all, since slop now only delays a timer firing, rather than allowing it to happen early. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/ia64/vmx/vlsapic.c b/xen/arch/ia64/vmx/vlsapic.c index b382e0b9c0..39f59a7e8a 100644 --- a/xen/arch/ia64/vmx/vlsapic.c +++ b/xen/arch/ia64/vmx/vlsapic.c @@ -242,7 +242,6 @@ void vtm_set_itc(VCPU *vcpu, uint64_t new_itc) } -#define TIMER_SLOP (50*1000) /* ns */ /* copy from timer.c */ extern u64 cycle_to_ns(u64 cyle); @@ -258,7 +257,7 @@ void vtm_set_itm(VCPU *vcpu, uint64_t val) cur_itc = now_itc(vtm); if (time_before(val, cur_itc)) val = cur_itc; - expires = NOW() + cycle_to_ns(val-cur_itc) + TIMER_SLOP; + expires = NOW() + cycle_to_ns(val-cur_itc); vmx_vcpu_unpend_interrupt(vcpu, ITV_VECTOR(vitv)); set_timer(&vtm->vtm_timer, expires); }else{ diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 8664de568e..600baeac05 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -45,8 +45,6 @@ string_param("sched", opt_sched); int sched_smt_power_savings = 0; boolean_param("sched_smt_power_savings", sched_smt_power_savings); -#define TIME_SLOP (s32)MICROSECS(50) /* allow time to slip a bit */ - /* Various timer handlers. */ static void s_timer_fn(void *unused); static void vcpu_periodic_timer_fn(void *data); @@ -775,8 +773,7 @@ static void vcpu_periodic_timer_work(struct vcpu *v) periodic_next_event = v->periodic_last_event + v->periodic_period; - /* The timer subsystem may call us up to TIME_SLOP ahead of deadline. */ - if ( (now + TIME_SLOP) > periodic_next_event ) + if ( now >= periodic_next_event ) { send_timer_event(v); v->periodic_last_event = now;